<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>网站信息</title>
    <link href="../../css/admin/style.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.8.3.min.js" type="text/javascript"></script >
    <script>
        $(function (){
            $.get("../../company/getwebmsg",function (res){
                console.log(res);
                if (res.code == 202){
                    window.parent.location.replace("../login.html");
                }else if (res.code == 500){
                    alert(res.msg);
                }else {
                    var str="";
                        var imgsrc =  "http://127.0.0.1:8080/userImg/companyLogo/"+res.data.logoname;
                        str += "<tr align='center'>";
                        str+="<td>"+res.data.webname+"</td>";
                        str+="<td><img src='"+imgsrc+"' width='30' height='30'/></td>";
                        str+="<td>"+res.data.recordnum+"</td>";
                        str+="<td>"+res.data.phone+"</td>";
                        str+="<td>"+res.data.companyname+"</td>";
                        str+="<td>"+res.data.admin.account+"</td>";
                        str+="<td>"+ (new Date(res.data.operTime).toLocaleString())+"</td>";
                        str+="<td><a href='javaScript:void(0)' onclick='toupdate()' class='tablelink'>修改</a></td> "
                        str+="</tr>";
                    $("#tableId").append(str);
                }
            },"json")
        })

        function toupdate(){
            location.assign("update.html");
        }
    </script>
</head>
<body>
<div class="rightinfo">

    <!--数据列表 -->
    <table class="tablelist" id="tableId">
        <tr>
            <th >网站名</th>
            <th >logo</th>
            <th >备案号</th>
            <th >联系电话</th>
            <th >公司名字</th>
            <th >操作人</th>
            <th >操作时间</th>
            <th >操作</th>
        </tr>

    </table>
</div>
</body>
</html>